<template>
  <div class="home">
    <history-data />
    <div class="main">
      <el-button @click="onNew">创建新项目</el-button>
    </div>
  </div>
</template>
<script setup>
import HistoryData from './components/HistoryData.vue';
import { useRouter } from 'vue-router';
import { useGraphData } from '@/store';
const graphDataStore = useGraphData();
const router = useRouter();
const onNew = () => {
  router.push('/graph');
  graphDataStore.clearCurrentId();
};
</script>
<style lang="less" scoped>
.home {
  display: flex;

  .main {
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(100% - 180px);
    height: 100vh;
  }
}
</style>
